#include "mini_base.h"

extern "C"
{
    __declspec(dllexport) void PrintMessage(const char* message) {
        std::cout << "Message from C#: " << message << std::endl;
    }

    __declspec(dllexport) const char* GetGameObjectName(const MonoToken* token) {
        auto object = token->GetConst<GameObject>();
        return object ? object->m_Name.c_str() : "";
    }

    __declspec(dllexport) void BindScriptInstance(MonoToken* token, MonoObject* script) {
        if (token) token->m_Inst = script;
    }

    __declspec(dllexport) void SetGameObjectName(MonoToken* token, const char* name) {
        auto object = token->Get<GameObject>();
        if (object)
        {
            object->m_Name = name;
        }
    
    }

    __declspec(dllexport) MonoToken* CreateGameObject()
    {
        return new MonoToken();
    }

}
